#ifndef TRAPEZE_H
#define TRAPEZE_H
#pragma once
#include <windows.h>
const int N = 4;
enum Exceptions
{
	NotVisible,		//	The figure will not visible
	NotTrapeze,		//	The figure is not trapeze	
	NotInside,		//	Second figure is not inside of first
	IncorrectData	//	Data format is not correct
};
class Trapeze
{
public:
	void setPoints (POINT[]);
	void setWidth (int);
	void setStyle (int);
	void setLineColor (COLORREF);
	void setFloodColor (COLORREF);
	void getPoints (POINT[]);
	int	getWidth ();
	int	getStyle ();
	COLORREF getLineColor ();
	COLORREF getFloodColor ();
	void drawFigure (HWND, HDC);
	void moveUp (HWND, HDC);
	void moveDown (HWND, HDC);
	void moveRight (HWND, HDC);
	void moveLeft (HWND, HDC);
	bool rotate ();
private:
	POINT points[N];
	int width;
	int style;
	COLORREF lineColor;
	COLORREF floodColor;
	inline int vectorMult (POINT, POINT);
	bool isParallel (POINT, POINT);
	bool isTrapeze (POINT[]);
	bool isVisible (HDC, HWND, POINT[]);
};
#endif TRAPEZE_H // !TRAPEZE_H